/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package examplesocket;

import javax.crypto.spec.SecretKeySpec;

/**
 *
 * @author 5m
 */
public class User {
    private String name;
    private String password;
    private String IP;
    private SecretKeySpec myAES;
    User(String IP)
    {
        this.IP=IP;
    }
    User(String name, String password)
    {
        this.name = name;
        this.password = password;
    }
    User(String name, String password, String IP)
    {
        this.name = name;
        this.password = password;
        this.IP=IP;
    }
    String getName()
    {
        return name;
    }

    String getPassword()
    {
        return password;
    }
    
    String getIP()
    {
        return IP;
    }
    SecretKeySpec getAES()
    {
        return myAES;
    }
    void setName(String name)
    {
        this.name=name;
    }

    void setPassword(String password)
    {
        this.password = password;
    }
    
    void setIP(String IP)
    {
        this.IP=IP;
    }
    
    void setAESKey(SecretKeySpec AESKey)
    {
        myAES = AESKey;
    }
    @Override
    public boolean equals(Object obj) {
        User tmp = (User) obj;
        return tmp.getName().equals(this.getName());
    }
}
